﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FleetCode.Model
{
    [Serializable]
    public class Ship
    {
        public int id { get; set; }
        public int lv { get; set; }
        public int luck { get; set; }
        public ItemGroup items { get; set; }

        public static Ship Convert(Grabacr07.KanColleWrapper.Models.Ship ship)
        {
            if (ship == null)
                return null;
            else
                return new Ship
                {
                    id = ship.Info.Id,
                    lv = ship.Level,
                    luck = ship.Luck.Current,
                    items = new ItemGroup(ship.Slots, ship.ExSlot)
                };
        }
    }
}